package com.prime.tutorial.moviestore.view.reports;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;


import com.prime.tutorial.moviestore.domain.Device;
import com.prime.tutorial.moviestore.service.reports.ReportsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.List;
/**
 * Provides the view level of the DevicesInstalled report.
 * @author vasylja
 */
@Component("devicesInstalled")
@Scope("request")
public class DevicesInstalledImpl {
    private ReportsService reportsService;
    private List<Device> listDevicesInstalled;

    @Autowired
    public DevicesInstalledImpl(ReportsService reportsService) {
        this.reportsService = reportsService;
        setListDevicesInstalled(this.reportsService.getDevicesInstalledReport());
    }

    public List<Device> getListDevicesInstalled() {
        return listDevicesInstalled;
    }

    private void setListDevicesInstalled(List<Device> listDevicesInstalled) {
        this.listDevicesInstalled = listDevicesInstalled;
    }
}
